package com.zzzy.cont.dao.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import lombok.Setter;

import java.time.LocalDateTime;

/**
 * 合同附件
 *
 * @author fc
 * @since 2024-06-11
 */
@Getter
@Setter
@TableName("con_attachment")
@Schema(description = "合同附件")
public class ConAttachment {

    @Schema(description = "ID")
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @Schema(description = "合同ID")
    @TableField("con_id")
    private Long conId;

    @Schema(description = "附件名称")
    @TableField("`name`")
    private String name;

    @Schema(description = "附件二进制流（长度最大为4G）")
    @TableField("file_blob")
    private byte[] fileBlob;

    @Schema(description = "创建时间")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @TableField("create_time")
    private LocalDateTime createTime;
}
